import request from '@/utils/request'

// 查询运抵报告列表
export function listExport(query) {
  return request({
    url: '/manifest/arrival/list',
    method: 'get',
    params: query
  })
}

// 查询运抵报告详细
export function getExport(id) {
  return request({
    url: '/manifest/arrival/' + id,
    method: 'get'
  })
}

// 新增运抵报告
export function addExport(data) {
  return request({
    url: '/manifest/arrival',
    method: 'post',
    data: data
  })
}

// 修改运抵报告
export function updateExport(data) {
  return request({
    url: '/manifest/arrival',
    method: 'put',
    data: data
  })
}

// 删除运抵报告
export function delExport(id) {
  return request({
    url: '/manifest/arrival/' + id,
    method: 'delete'
  })
}

// 导出运抵报告
export function exportExport(query) {
  return request({
    url: '/manifest/arrival/export',
    method: 'get',
    params: query
  })
}

// 申报运抵报告
export function declareArrival(ids) {
  return request({
    url: '/manifest/arrival/declare/' + ids,
    method: 'put'
  })
}

// 构建收费单数据
export function buildChargeData(data) {
  return request({
    url: '/manifest/arrival/buildChargeData',
    method: 'post',
    data: data
  })
}

// 生成收费单
export function generateCharge(data) {
  return request({
    url: '/manifest/arrival/generateCharge',
    method: 'post',
    data: data
  })
}

// 生成运抵收费单
export function generateFee(data) {
  return request({
    url: '/charge/createChargeOrder',
    method: 'post',
    data: data
  })
}
